package testcase;

import static org.junit.Assert.*;

import org.junit.Test;

import entity.GameObj;

public class GameObjTest {


        
         public class GameObjSub extends GameObj {
                 public GameObjSub(String imgs) {
                        super(imgs);
                                
                    }
                        public GameObjSub(String img, int cropwidth, int cropheight) {
                                super(img,cropwidth,cropheight);
                        }
                        
         }
         
         GameObjSub obj=new GameObjSub("/images/dice/Dices.png");
         GameObjSub obj2=new GameObjSub("/images/dice/Dices.png",30,50);
         





        @Test
        public void testGetX() {
                obj.setX(5);
                int i=obj.getX();
                assertEquals(i,5);
        }

        @Test
        public void testGetY() {
                obj.setY(6);
                int i=obj.getY();
                assertEquals(i,6);
        }

        @Test
        public void testGetBoxNum() {
            obj.setCurrentBoxNum(50);
            int j=obj.getBoxNum();
            assertEquals(j,10);
            
             obj.setCurrentBoxNum(50);
            j=obj.getBoxNum();
            assertEquals(j,20);
       
        }

}